package mamikeji.liaowa.ui.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import mamikeji.liaowa.R;

/**
 * Created by Administrator on 2017/7/11 0011.
 */
public class ListViewEmptyAdapter extends BaseAdapter{
    private Context context;
    String counts;
    public ListViewEmptyAdapter(Context context , String counts){
        this.context = context;
        this.counts = counts;
    }
    @Override
    public int getCount() {
        return 1;
    }

    @Override
    public Object getItem(int i) {
        return null;
    }

    @Override
    public long getItemId(int i) {
        return 0;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        view = LayoutInflater.from(context).inflate(R.layout.item_list_empty,viewGroup,false);
        ((TextView)view.findViewById(R.id.textView_list_null)).setText(counts);
        return view;
    }
}
